package com.us.usws.batch.resimp;

import java.io.File;
import java.io.IOException;

import org.apache.commons.io.FileUtils;

import com.us.usws.biz.ResourceStorageReplacer;
import com.us.usws.model.domain.video.VideoFile;

public class BatchXta {

	public static void copyVideoFiles(String entryDir, String origVideoFile, String origSnapshotFile, VideoFile videoFile)
			throws IOException {
		String snapshotPath = entryDir + "/" + origSnapshotFile;
		String videoPath = entryDir + "/" + origVideoFile;

		FileUtils.copyFile(new File(snapshotPath),
				new File(ResourceStorageReplacer.getVideoFileSnapshotPath(videoFile.getUid(), videoFile.getSnapshot())));

		FileUtils.copyFile(new File(videoPath),
				new File(ResourceStorageReplacer.getVideoFilePath(videoFile.getUid(), videoFile.getFileExt())));

	}
}
